<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Pdf{
	function to_pdf($html,$file_name){
		require_once './dompdf/dompdf_config.inc.php';
		$obj_pdf = new DOMPDF();
		$obj_pdf->load_html($html);
		$obj_pdf->render();
		$obj_pdf->stream($file_name);
	}
	function to_pdf_landscape($html,$file_name){
		require_once './dompdf/dompdf_config.inc.php';
		$obj_pdf = new DOMPDF();
		$obj_pdf->set_paper('A4', 'landscape');
		$obj_pdf->load_html($html);
		$obj_pdf->render();
		$obj_pdf->stream($file_name);
	}
}
